package fun.sanguo.service.interact;

import fun.sanguo.model.dto.DataInfo;
import fun.sanguo.model.dto.PageInsert;
import fun.sanguo.model.dto.PageUpdate;
import fun.sanguo.model.dto.interact.InteractPersonageDislikeInsert;
import fun.sanguo.model.dto.interact.InteractPersonageDislikeResult;
import fun.sanguo.model.dto.interact.InteractPersonageDislikeUpdate;
import fun.sanguo.utils.exception.ArtificialException;

import java.util.Map;

/**
 * 互动-人物厌恶记录表 Service接口
 *
 * @author ZYP
 * @date 2023-10-13
 */
public interface InteractPersonageDislikeService {

    /**
     * 新增
     *
     * @param pageInsert
     * @param userId
     * @param userIp
     * @return
     * @throws ArtificialException
     */
    DataInfo<InteractPersonageDislikeResult> insert(PageInsert<InteractPersonageDislikeInsert> pageInsert, String userId, String userIp) throws ArtificialException;

    /**
     * 删除
     *
     * @param pageUpdate
     * @param userId
     * @return
     * @throws ArtificialException
     */
    DataInfo<InteractPersonageDislikeResult> delete(PageUpdate<InteractPersonageDislikeUpdate> pageUpdate, String userId) throws ArtificialException;

    /**
     * 查询指定人物的厌恶数量、指定用户是否厌恶
     *
     * @param userId
     * @param personageId
     * @return
     * @throws ArtificialException
     */
    InteractPersonageDislikeResult getSummaryByUserPersonage(String userId, String personageId) throws ArtificialException;

    /**
     * 查询所有人物的厌恶数量及是否被指定用户厌恶
     *
     * @param userId
     * @return
     * @throws ArtificialException
     */
    Map<String, InteractPersonageDislikeResult> getSummaryByUser(String userId) throws ArtificialException;
}
